package com.zhangyu.eat.register.presenter;

import com.zhangyu.eat.register.modle.RegisterBiz;
import com.zhangyu.eat.register.modle.RegisterListenter;
import com.zhangyu.eat.register.view.RegisterView;

/**
 * Created by SoSho on 2016/10/14.
 */

public class Registerpresenter {
    private RegisterBiz registerBiz;
    private RegisterView mView;

    public Registerpresenter(RegisterView view) {
        this.mView = view;
        registerBiz = new RegisterBiz();
    }

    public void registerin() {
        registerBiz.Register(mView.getUserName(), mView.getNikeName(), mView.getPassWord(), mView.getImagePath(), new RegisterListenter() {
            @Override
            public void registerSucceed() {
                mView.toSucceedActivity();
            }

            @Override
            public void registerFailed() {
                mView.showRegisterFailedView();
            }
        });

    }
}
